import fly from '@/utils/request'
import URL from '@/utils/host'


//红包拿来
export function getbag(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'redbag',
        params: data
    })
}
//发红包
export function sendbag(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'redbag/send_redbag',
        body: data
    })
}
// 红包详情
export function baginfo(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'redbag/info',
        params: data
    })
}
// 拆红包
export function bagOpen(data){
    return fly.request({
        method: 'post', 
        url:URL.host2+'redbag/grab_redbag',
        body: data
    })
}

// 年龄
export function redbagBonus(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'redbag/get_bonus_setting',
        params: data
    })
}